<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<link rel="stylesheet" type="text/css" href="../../../Themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="../../../Themes/icon.css">
		<link rel="stylesheet" type="text/css" href="../../../CSS/demo.css">
		<link rel="stylesheet" type="text/css" href="../../../CSS/common.css">
		<link rel="stylesheet" type="text/css" href="../../../CSS/print.css">
	</head>

	<body>
		<div class="div_print_info_portait">
			<h1 align="center">绵阳市高水农副产品批发有限公司</h1>
			<h1 align="center" id="title">冲销信息</h1>
			<form id="ff" method="post" style="width:95%;">
				<table cellspacing="4" style="margin-top: 10px;margin-left: 0px;margin-bottom: 10px;">
					<tr>
						<th>订单编号</th>
						<td></td>
						<td>
							<input type="text" name="ORDER_NO" class="print_text_style" />
						</td>
					</tr>
				</table>
				<table class="altrowstable printtable" style="text-align: left;width: 100%;">
					<tr>
						<td width="15%">冲销人</td>
						<td width="10%">
							<input type="text" class="print_text_style" name="CHARGER" />
						</td>
						<td width="15%">类型</td>
						<td width="10%">
							<input type="text" class="print_text_style" name="TYPE" />
						</td>
					</tr>
					<tr>
						<td>数量</td>
						<td>
							<input type="text" class="print_text_style" name="AMOUNT" />
						</td>
						<td>金额</td>
						<td>
							<input type="text" class="print_text_style" name="REAL_SUM" />
						</td>
					</tr>
				</table>

				<table class="altrowstable printtable" style="text-align: left;width: 100%;margin-top: 0">
					<tr>
						<td>备注</td>
						<td colspan="7">
							<input class="print_text_style" NAME="MEM0" type="text" style="width:100%;height: 50px;" /></td>
					</tr>
				</table>
			</form>
		</div>
	</body>

	<script type="text/javascript" src="../../../JS/common.js"></script>
	<script type="text/javascript" src="../../../JS/jquery.min.js"></script>
	<script type="text/javascript" src="../../../JS/jquery.easyui.min.js"></script>
	<script type="text/javascript">
		var id = getID();
		$(document).ready(function(){
	    	loadRemote();
		});
		function loadRemote() {
			var _data;
			var _url = RemoteLinkAddress + '/frozen/outorder/findbyid.do?ID=' + id;
			$.ajax({
				type:"get",
				url:_url,
				dataType:'json',
				success:function(result){
					_data = result;
					if(result.TYPE == 2){
						_data.TYPE = "冲正";
					}else if(result.TYPE == 3){
						_data.TYPE = "冲负";
					}
					processInput(_data);
				}
			});
		}
		
		function processInput(data){
			var _name;
			console.log(data);
			$("input[name]").each(function(index){
				_name = $(this).attr("name");
				if(data[_name] != undefined){
					console.log("kdsafhk");
					$(this).val(data[_name]);
				}
			});
		}
		
	</script>
	</script>

</html>